Requirements for the Chess Game
Learn about all requirements of the online Chess game.
We'll cover the following
In this lesson, we’ll list the requirements of the online chess game. This is a very crucial step since requirements define the scope of a problem, so getting them right from the interviewer and understanding them well will make the design of the rest of the system smooth and easy.
We’ll use the notational convention to identify each requirement with a unique label "Rn," where "R" is short for Requirement and "n" is a natural number.
Requirement collection#
R1: The purpose of this system is to enable multiplayer in a game of chess via an online platform.
R2: The game will be played according to the official rules of an international chess game.
R3: Each player is randomly assigned the color—either black or white
R4: At the start of the game, each player will have eight pawns, two rooks, two bishops, two knights, one queen, and one king on the board.
R5: The player with the white pieces will make the first move.
R6: It is not possible for a player to retract or undo their move once it has been made.
R7: The system will keep a record of all moves made by both players.
R8: The game may end in a checkmate, forfeiture, stalemate (a draw), or resignation.
International chess rules#
The following table represents the basic rules of chess:
Rules for pieces
Piece | Rules |
King |
|
Queen |
|
Pawn |
|
Bishop |
|
Rook |
|
Knight |
|
The following table represents certain situations we might face while playing chess:
Rules for situations
Situation | Rules |
Checkmate |
|
Stalemate |
|
Forfeiture |
|
Resignation |
|
Castling |
|
We've identified our requirements for the problem. In the next lesson, we will define different use cases for the online chess game design.
Getting Ready: The Chess Game
Use Case Diagram for the Chess Game